﻿create procedure [dbo].[usp_AppDomainUpdate]
	@AppDomainId int
	, @ConcurrencyId rowversion
	, @BaseDirectory nvarchar(1024)
	, @DomainManager nvarchar(256)
	, @FriendlyName nvarchar(256)
	, @Id int
	, @RelativeSearchPath nvarchar(1024)
as

begin try
	
	begin transaction
	
		update [dbo].[AppDomain]
		set
			BaseDirectory = @BaseDirectory
			, DomainManager = @DomainManager
			, FriendlyName = @FriendlyName
			, Id = @Id
			, RelativeSearchPath = @RelativeSearchPath
		where AppDomainId = @AppDomainId and ConcurrencyId = @ConcurrencyId
		
	commit transaction

end try
	
begin catch
	if @@trancount > 0
	begin
		rollback transaction;
	end
	execute [dbo].[usp_SqlErrorInsert]
end catch


